<div id="attachment_<%= post.id %>" align="left">
    <% if !post.attachments.nil?&&post.attachments.size!=0 %>
   			<% post.attachments.each_with_index do |attachment, idx| %>
   			<div id="attachment_<%= post.id %>_<%= attachment.id %>_<%=source%>">
   				<p>
		        	<% if attachment.image? && source!='edit' %>
				        <% dir = attachment.public_filename %>
				        <p class="post_attachment_img"><a href="<%= dir %>" target="_blank"><img border="0" src="<%= dir %>" onclick=""/></a></p>
		            <% end %>
		       		<img src="/images/fn.gif"/>&nbsp;<%=attachment.filename.to_s %>&nbsp;
		            <a href="<%= url_for(:controller => 'posts',:action => 'download', :id => post, :attachment_id => attachment) %>"><%=_('download') %></a>
		            <% if source=='edit' %>
						<%=link_to_remote _('remove'), :url => {:action => "remove_attachment",:attachment_id => attachment, :id => post, :paper_id => post.forum, :topic_id => post.topic}, :method => :post, :confirm => _('confirm_remove_attachment') %>
		            <% end %>
            </p></div>
   	 	<% end %>
    <% end %>
</div>
